﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductsValidation.aspx.cs" Inherits="WorkShop.WorkShop.ProductsValidation" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Knight Medicals</title>
</head>
<body>
    <form id="frmProducts" runat="server">
    <div>
        
        <h2>::Product Details::&nbsp;</h2>
        
    </div>
        <asp:Panel ID="Panel1" runat="server" Height="453px">
            <asp:Label ID="lblProductID" runat="server" Text="Product ID:" Width="145px"></asp:Label>
            <asp:TextBox ID="txtProductID" runat="server" Width="145px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="valProductID" runat="server" ControlToValidate="txtProductID" ErrorMessage="Please enter product id in XXXX format starting with a letter." ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="valProductIdFormat" runat="server" ControlToValidate="txtProductID" Display="Dynamic" ErrorMessage="Please enter product id in XXXX format starting with a letter." ForeColor="Red" SetFocusOnError="True" ValidationExpression="^[a-zA-Z]{1}[0-9]{3}$">*</asp:RegularExpressionValidator>
            <br />
            <asp:Label ID="lblProductDescription" runat="server" Text="Product Description:" Width="145px"></asp:Label>
            <asp:TextBox ID="txtProductDescription" runat="server" Width="145px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="valProductDescription" runat="server" ControlToValidate="txtProductDescription" ErrorMessage="Please enter product description." ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
            <br />
            <asp:Label ID="lblQuantity" runat="server" Text="Quantity:" Width="145px"></asp:Label>
            <asp:TextBox ID="txtQuantity" runat="server" Width="145px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="valQuantity" runat="server" ControlToValidate="txtQuantity" ErrorMessage="Please enter quantity" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
            <asp:CompareValidator ID="valQuantityFormat" runat="server" ControlToCompare="txtQuantity" Display="Dynamic" ErrorMessage="Quantity must be a numberic" ForeColor="Red" SetFocusOnError="True">*</asp:CompareValidator>
            <br />
            <asp:Label ID="lblPrice" runat="server" Text="Price:" Width="145px"></asp:Label>
            <asp:TextBox ID="txtPrice" runat="server" Width="145px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="valPrice" runat="server" ControlToValidate="txtPrice" ErrorMessage="Please enter price." ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
            <asp:CompareValidator ID="valPriceFormat" runat="server" ErrorMessage="CompareValidator" ForeColor="Red" SetFocusOnError="True">*</asp:CompareValidator>
            <br />
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="RegularExpressionValidator" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            <br />
            <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="CustomValidator" ForeColor="Red"></asp:CustomValidator>
            <br />
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" HeaderText="Summary Validation" />
        </asp:Panel>
    </form>
</body>
</html>
